Commit Graph

5306 Commits

Author SHA1 Message Date
NightKev
4dacab9b41 Apply Biome 2025-06-14 11:12:23 -07:00
NightKev
7d31040ef4
Merge branch 'beta' into move-use-type 2025-06-14 11:08:45 -07:00
NightKev
7cf51d48a7 [Test] Make sure items are removed from enemies in Last Respects test 2025-06-14 05:06:46 -07:00
Wlowscha
fd1404706a
[Bug] Remove empty modifierPool (#5988) 2025-06-14 12:01:29 +00:00
Bertie690
a41de39d4f
[Misc] Run biome on all files; update some rules to be errors now
https://github.com/pagefaultgames/pokerogue/pull/5962/

* Fixed lint issue; ran biome on entire repository

* Fixed biome.jsonc

* Trimmed trailing whitespace... again...

* Fixed PR template md

* Fixed package json

* Fixed void return issues + ran biome again

* ran biome
2025-06-14 00:59:34 -07:00
fabske0
9a525ac8fd
[UI/UX] Position setting Icons dynamically (#5969)
* position setting icons dynamically

* add comment for potential overlap
2025-06-14 03:19:05 +00:00
Bertie690
d91a6ee11e
[Github] Update pull_request_template.md with more labels
https://github.com/pagefaultgames/pokerogue/pull/5974

* Update pull_request_template.md with more labels

More better

* Fix create test script name post refactor

Forgot to change it earlier
2025-06-14 01:38:54 +00:00
damocleas
718d6f61cf
[Bug] Fix Fog interactions with Morning Sun/Synthesis/Moonlight and Solar Beam/Blade (#5987)
Fix Weather based Healing Moves and Solar Beam/Blade not interacting with Fog

Update move.ts
2025-06-13 21:10:38 -04:00
NightKev
2ae86fcfe6 Merge branch 'beta' into move-use-type 2025-06-13 02:54:29 -07:00
NightKev
7c6189e812
[Refactor] Create utility function coerceArray (#5723)
* [Refactor] Create utility function `makeArray`

This replaces the `if(!Array.isArray(var)) { var = [var] }` pattern

* Replace `if` with ternary, rename to `coerceArray`

* Add TSDocs

* Improve type inferencing

* Replace missed `Array.isArray` checks

* Apply Biome

* Re-apply changes to phase manager

* Re-apply to `SpeciesFormChangeStatusEffectTrigger` constructor

Apply to new instances in test mocks
2025-06-12 21:30:01 -07:00
Bertie690
a1a214002d Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-12 19:02:25 -04:00
Mourouh
425985a056
[Balance] Add wild encounter chance to Maushold and Dudunsparce forms (#5975)
Added wild encounter chance to Maushold and Dudunsparce forms
2025-06-12 16:56:37 -05:00
Bertie690
8d6edddc42 Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-12 08:42:25 -04:00
Dean
ff9aefb0e5
[Bug] Activate PostSummon Abilities in Speed and Priority Order
https://github.com/pagefaultgames/pokerogue/pull/5513

* Add prependToPhaseWithCondition and use it in SummonPhase to determine speed order

* Move logic to PostSummonPhase

* Add test base

* Pivot to using sort strategy instead

* Add and update tests

* Support priority ability activations

* Ensure priority abilities are still activated on switch in

* Add test for priority

* Update to use priority numbers instead of a boolean

* Add ability priorities to constructors

* Move sorting to BattleScene

* Rename phase file

* Update import

* Move application to applyPostSummonAbAttrs and stop assuming no other phases in queue

* Ensure all PostSummonPhases from encounters are added at the same time

* Switch to priority queue approach

* Ensure that zero/negative priority activations happen after postsummonphase

* Revert 07646fe (not needed due to stable sort)

* Always create separate ability phases for passive and use boolean instead of priority number when applying

* Add test for dynamic updates

* Add BattlerIndex import

* Clear queues for testing

* Benjie suggestion

* Split files

* Update import in battlescene

* Remove extra spaces added by VSCode

* Fix other conflicts

* Update PhaseManager

* Update to use PhaseManager

* Immediately start postsummons

* Fix test

* Fix BattlerIndex import

* Remove unused imports

* Fix postsummon application

* Make priority readonly
2025-06-11 22:28:27 -07:00
Sirz Benjie
1029afcdbf
[Refactor] Remove circular dependencies (part 4) (#5964)
* Add abilityAttr.is methods

* [WIP] move modifier stuff around

* Untangle circular deps from modifiers

* Move unlockables to own file

* Untangle all circular deps outside of MEs

* Move constants in MEs to their own files

* Re-add missing import to battle.ts

* Add necessary overload for getTag

* Add missing type import in weather.ts

* Init modifier types and pools in loading-scene

* Remove stray commented code

* 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>
2025-06-11 19:42:04 -07:00
NightKev
aff473d849
Merge branch 'beta' into move-use-type 2025-06-11 18:26:32 -07:00
Dobin Shin
ba2158ec64
[UI/UX] Default cursor to no when stop trying to teach move
https://github.com/pagefaultgames/pokerogue/pull/5924

* [UI/UX] "Stop trying to teach move" Defaulting to "No"

* [Test] setCursor to 0, 'Yes' to end learning move

* Move confirmUIMode to its own file in enums, add docs

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-06-11 16:24:27 -07:00
NightKev
4920d006e8 Add enumValueToKey utility function 2025-06-11 05:44:14 -07:00
Lugiad
f499ea0568
[UI/UX] [Localization] Type icons corrections (#5952)
* Updated both Spanish type icons

* Update Brazilian Portuguese type icons

* Update Catalan type icons

* Update Traditional Chinese type icons

* Update Turkish type icons

* Update Russian type icons

* Update Catalan type icons

* Delete error

* Update Russian type icon

* Update Russian type icons
2025-06-11 04:44:30 +00:00
Bertie690
aea2c178c9
[i18n] Added locales text for force switch moves (#5930) 2025-06-10 19:54:44 -04:00
Bertie690
5632ad70bd
Update move-phase.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-06-10 08:11:00 -04:00
NightKev
5c5da889d7 Convert MoveUseMode enum to const object 2025-06-09 20:50:48 -07:00
NightKev
93767f1550 Use toEndOfTurn() instead of to("BerryPhase") in powder.test.ts 2025-06-09 20:46:53 -07:00
NightKev
9c99d42aa5 Use game.field instead of game.scene in metronome.test.ts 2025-06-09 20:45:59 -07:00
NightKev
8f6356b971 Use game.field instead of game.scene in instruct.test.ts
Also `game.toEndOfTurn()` instead of
`game.phaseInterceptor.to("BerryPhase")`
2025-06-09 20:43:10 -07:00
NightKev
0f031d433c Remove extra space in TSDoc in move-phase.ts 2025-06-09 20:25:49 -07:00
NightKev
05e0779e08 Restore {} in turn-start-phase.ts
Fixes `lint/correctness/noSwitchDeclarations`
2025-06-09 20:10:10 -07:00
NightKev
95d75b5107 Re-add public, remove unnecessary default value in battler-tags.ts 2025-06-09 19:57:21 -07:00
NightKev
483315895f Minor comment updates and remove unused imports in move.ts 2025-06-09 19:47:29 -07:00
Bertie690
581348ec0a
[Misc] Remove extra newline in test-boilerplate.ts (#5965) 2025-06-09 18:28:39 -07:00
Bertie690
e9bd0810ba Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-09 21:10:30 -04:00
Bertie690
1ee87c4218 Fixed formatting and suttff 2025-06-09 21:10:24 -04:00
NightKev
60105f0402
[Dev] Update test creation script (#5939) 2025-06-09 17:48:41 -07:00
Bertie690
f157c405f0 Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-09 20:47:15 -04:00
Sirz Benjie
48e911e03c
[Refactor] Remove circular deps 3 (#5959)
* Move game-mode to its own file

Reduces circular imports to 325

* Move battler-index to own file

Reduces circular deps to 314

* Move trainer-variant to own file

Reduces circ deps to 313

* Move enums in pokemon to their own file

* Move arena-tag-type to its own file

* Move pokemon-moves to its own file

* Move command to own file

* Move learnMoveType to own file

* Move form change item to own file

* Move battlerTagLapseType to own file

* Move anim enums to own shared file

* Move enums out of challenges

* Move species form change triggers to own file

Reduces circ imports to 291

* Update test importing pokemon move

* Replace move attribute imports with string names

* Untangle circular deps from game data

* Fix missing string call in switch summon phase

* Apply kev's suggestions from code review

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

* Ensure ChargeMove's is method calls super

* Use InstanceType for proper narrowing

* 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>
2025-06-09 16:24:13 -07:00
Bertie690
c9356237cb Battler Tags doc fixes 2025-06-09 19:15:44 -04:00
Bertie690
8fced3607a Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-09 09:25:53 -04:00
Bertie690
89804af78f Fixed gorilla tactics bug 2025-06-09 09:25:46 -04:00
AJ Fontaine
b1c50dd69f
[Bug] Fix TM compatibility for Terapagos and Knock Off (#5958)
Fix TM compatibility for Terapagos and Knock Off
2025-06-08 16:49:50 -07:00
NightKev
d2ace47e1e [Test] Add missing ability override to Dancer tests 2025-06-08 15:36:01 -07:00
Wlowscha
5ef88a6d4d
[Refactor] Refactor select-modifier-phase.ts (#5886)
* Refactored select-modifier-phase.ts

* Added some missing type signatures

* Changes from suggestions

* Added ModifierSelectCallback type
2025-06-08 15:13:26 -07:00
Bertie690
3e05489e9e Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-08 13:27:53 -04:00
Bertie690
a985438620 Fixed instruct test to not bork 2025-06-08 12:53:37 -04:00
Tiago Rodrigues
37767799cd
[Bug] Gorilla Tactics now activates on protect and miss (#5567)
* [Bug] Fix #5112: Gorilla Tactics only registers succesful moves as move usage

* Apply small fixes from code review

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-06-08 12:52:48 -04:00
Bertie690
be6000f590 Fixed phasemanager bugs 2025-06-08 09:53:10 -04:00
Bertie690
a0bffe6114 Fixed space 2025-06-08 09:44:50 -04:00
Bertie690
c40c854eb7 Merge remote-tracking branch 'upstream/beta' into move-use-type 2025-06-08 09:42:36 -04:00
Sirz Benjie
1c4edabd1d
[Refactor] Ensure that new phases are created through the phase manager
https://github.com/pagefaultgames/pokerogue/pull/5955

* Add newPhase method to phase-manager

* Update calls to append/prepend phase to use string phase

* Replace instantiations of new phase with phase manager
2025-06-07 23:55:30 -07:00
NightKev
75beec12a8
[Dev] Enable Biome checking of ability.ts (#5948) 2025-06-07 21:43:30 -07:00
Bertie690
35a09af475
[Utils] Create utility function randSeedFloat (#5767) 2025-06-07 19:29:10 -07:00