pokerogue/test
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
..
abilities [Bug] Activate PostSummon Abilities in Speed and Priority Order 2025-06-11 22:28:27 -07:00
achievements [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
arena [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
battle [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
battlerTags [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
data [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
eggs [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
field [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
inputs [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
items [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
moves [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
mystery-encounter [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
phases [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
plugins/api [Bug] Fix clear ignoring errors from server (#5722) 2025-04-29 23:55:42 -07:00
settingMenu [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
sprites [Refactor] Refactor variant sprite code part 1 (#5592) 2025-04-09 10:43:05 -05:00
system [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
testUtils [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
ui [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
account.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
battle-scene.test.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
boss-pokemon.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
daily_mode.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
endless_boss.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
enemy_command.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
escape-calculations.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
evolution.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
final_boss.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
fontFace.setup.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
game-mode.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
imports.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
internals.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
misc.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
reload.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
utils.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
vitest.setup.ts [Biome] Add "no unused imports" rule (#5580) 2025-03-29 10:24:23 +00:00